<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}

</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">

        <div class="panel mgl15 mgr15">
            <div class="panel-body">
                <!--路径导航-->
                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:;">门店管理</a>
                    </li>
                    <li class="active">小票打印设置</li>
                </ol>
                <div>
                    <div id="print">

                            {volist name="data" id="vo"}
                        <form id="frm_{$vo['cate']}">
                            <div class="panel panel-default ng-scope">
                                <div class="panel-heading">
                                    {:getprinttplname($vo['cate'])}设置
                                    <a class="btn btn-info pull-right" style="margin-top: -7px;" onclick="tj('{$vo['cate']}')">修改</a>

                                </div>
                                <div class="panel-body">
                                    <div class="col-sm-12">
                                        <div class="form-horizontal" data-layout="horizontal">
                                            <div class="form-group">
                                                <input type="hidden" name="cate" value="{$vo['cate']}">
                                                <input type="hidden" name="mid" value="{$mid}">
                                                <label class="col-sm-2 control-label">标题：</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control"
                                                           placeholder="" name="title" value="{$vo['title']}"
                                                           required="required" id="title">
                                                    <div class="r-message text-danger"></div>
                                                    <div class="r-desc ">

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-12">
                                        <div class="form-horizontal" data-layout="horizontal">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">坐标：</label>
                                                <div class="col-sm-1" style="width: 20px;line-height: 34px;">X

                                                </div>
                                                <div class="col-sm-1">
                                                    <input type="text" class="form-control" autocomplete="off"
                                                           placeholder="" value="{$vo['x']}" name="x"
                                                           required="required">
                                                </div>
                                                <div class="col-sm-1" style="width: 20px;line-height: 34px;">Y

                                                </div>
                                                <div class="col-sm-1">
                                                    <input type="text" class="form-control" autocomplete="off"
                                                           value="{$vo['y']}"
                                                           placeholder="" name="y" required="required">
                                                </div>

                                                <div class="r-message text-danger"></div>
                                                <div class="r-desc ">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-12">
                                        <div class="form-horizontal" data-layout="horizontal">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">小票数据：</label>
                                                <div class="col-sm-3">
                                                  <textarea class="form-control" style="resize: none;width:300px;"
                                                            rows="20"
                                                            name="info" autocomplete="off" placeholder=""
                                                            required="required"> {$vo['info']}</textarea>
                                                    <div class="r-message text-danger"></div>
                                                    <div class="r-desc ">

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-12">
                                        <div class="form-horizontal" data-layout="horizontal">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">内容大小：</label>
                                                <div class="col-sm-1" style="width: 20px;line-height: 34px;">宽

                                                </div>
                                                <div class="col-sm-1">
                                                    <input type="text" class="form-control" autocomplete="off"
                                                           placeholder="" value="{$vo['bmpsize1']}" name="bmpsize1"
                                                           required="required">
                                                </div>
                                                <div class="col-sm-1" style="width: 20px;line-height: 34px;">高

                                                </div>
                                                <div class="col-sm-1">
                                                    <input type="text" class="form-control" autocomplete="off"
                                                           value="{$vo['bmpsize2']}"
                                                           placeholder="" name="bmpsize2" required="required">
                                                </div>

                                                <div class="r-message text-danger"></div>
                                                <div class="r-desc ">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>

                        {/volist}




                    </div>
                </div>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>
<script>
    function tj(obj) {

        $.ajax({
            url: "{:url('printset/index')}",
            data: $('#frm_'+obj).serialize(),
            dataType: "json",
            type: "post",
            success: function (res) {
              if(res.code==0){
                  layer.msg('设置成功');
              }else{
                  layer.msg('设置失败');
              }
            }

        })

    }

</script>
</body>

</html>
